import request from '@/utils/request'

// 友情链接分页
export function pagingFriendlyLink(dataRequest) {
	return request({
		url: '/admin/config/link/paging',
		method: 'POST',
		data: dataRequest
	})
}

// 新增友情链接
export function addFriendlyLink(dataRequest) {
	return request({
		url: '/admin/config/link',
		method: 'POST',
		data: dataRequest
	})
}

// 修改友情链接
export function editFriendlyLink(dataRequest) {
	return request({
		url: '/admin/config/link',
		method: 'PUT',
		data: dataRequest
	})
}

// 上下架友情链接
export function publishFriendlyLink(dataRequest) {
	return request({
		url: '/admin/config/link/publish',
		method: 'PUT',
		data: dataRequest
	})
}
// 友情链接详情
export function getFriendlyLinkDetail(id) {
	return request({
		url: '/admin/config/link/' + id,
		method: 'GET',
	})
}

// 删除友情链接
export function delFriendlyLink(idList) {
	return request({
		url: '/admin/config/link/' + idList,
		method: 'DELETE',
	})
}
